package wzh.crm.bl;

import java.sql.SQLException;

import wzh.crm.db.DB;
import wzh.crm.vo.*;

/**
 * Created by wangzehao on 2016/5/25.
 */
public class BL {
    static public CURDBL<ContactVo> contactBL(){
        try {
            return new CURDBL<>(DB.contactDB());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    static public CURDBL<ContractVo> contractBL(){
        return new CURDBL<>(null);
    }

    static public CustomerBL customerBL(){
        try {
            return new CustomerBL(DB.customerDB());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    static public OpportunityBL opportunityBL(){
        try {
            return new OpportunityBL(DB.opportunityDB());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    static public CURDBL<ProductVo> productBL(){
        try {
            return new CURDBL<>(DB.productDB());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
